//
//  cl_AppManager.m
//  ManagerStaff
//
//  Created by vu hoang son on 8/2/14.
//  Copyright (c) 2014 seahorse. All rights reserved.
//

#import "cl_AppManager.h"

@interface cl_AppManager ()

@end

@implementation cl_AppManager
static cl_AppManager* m_shareInstance = nil;
+(cl_AppManager*)shareInstance
{
    if (m_shareInstance == nil) {
        m_shareInstance = [[super alloc] init];
    }
    return m_shareInstance;
}

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

-(BOOL)IsNoCacheScreen:(int)iScreenIndex
{
    if (iScreenIndex>=SCREEN_FINAL_CACHE) {
        return TRUE;
    }
    else
        return FALSE;
}
-(UIViewController*)CreateScreenByIndex:(int)iScreenIndex
{
    UIViewController* screen = nil;
    switch (iScreenIndex) {
        case SCREEN_ADMIN_ID:
            screen = (cl_adminViewController*)[[cl_adminViewController alloc] initWithNibName:@"cl_adminViewController" bundle:nil];
            break;
    }
    
    return screen;
}
@end
